{% extends "base.html" %}

{% block content %}
<h1> Welcome to my blog</h1>

<u><h2> My favorite websites</h2></u>
{% for website in website %}

<a href="http://{{website.title}}">{{website.title}}</a>

{% endfor %}
<u><h2>Category</h2><u>
{% for category in category %}
<ul>
<h2><a href="/blog/{{category.id}}">{{ category.name}}</a></h2>

{% endfor %}

{% for slogan in slogan %}
				<p> {{slogan.title}}</p>
				{% endfor %}
				
{% for title in title %}
	<p> {{title.title}}</p>
	{% endfor %}

				
{% for pages in pages %}
<h2><a href="/blog/{{pages.id}}">{{ pages.title }}</a></h2>
<div class="post_body"> {{pages.body|safe|linebreaks }}
</div>
{% endfor %}

{% for post in post %}

<h2><a href="/blog/{{post.id}}">{{ post.title }}</a></h2>
<h4> Category: {{post.category.name}}</h4>

<div class="post_meta"> on {{ post.created }}
</div>

<div class="post_body"> {{ post.body|safe|linebreaks }}
</div>


{% endfor %}

{% endblock %}